<!doctype html>
<html lang="en">
<head><title>HTTP Status 500 – Internal Server Error</title>
    <style type="text/css">body {
        font-family: Tahoma, Arial, sans-serif;
    }

    h1, h2, h3, b {
        color: white;
        background-color: #525D76;
    }

    h1 {
        font-size: 22px;
    }

    h2 {
        font-size: 16px;
    }

    h3 {
        font-size: 14px;
    }

    p {
        font-size: 12px;
    }

    a {
        color: black;
    }

    .line {
        height: 1px;
        background-color: #525D76;
        border: none;
    }</style>
</head>
<body><h1>HTTP Status 500 – Internal Server Error</h1>
<hr class="line"/>
<p><b>Type</b> Exception Report</p>
<p><b>Message</b> Request processing failed; nested exception is java.lang.IllegalStateException: Optional int parameter
    &#39;userId&#39; is present but cannot be translated into a null value due to being declared as a primitive type.
    Consider declaring it as object wrapper for the corresponding primitive type.</p>
<p><b>Description</b> The server encountered an unexpected condition that prevented it from fulfilling the request.</p>
<p><b>Exception</b></p>
<pre>org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.IllegalStateException: Optional int parameter &#39;userId&#39; is present but cannot be translated into a null value due to being declared as a primitive type. Consider declaring it as object wrapper for the corresponding primitive type.\n\torg.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:982)\n\torg.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)\n\tjavax.servlet.http.HttpServlet.service(HttpServlet.java:652)\n\torg.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)\n\tjavax.servlet.http.HttpServlet.service(HttpServlet.java:733)\n\torg.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)\n\torg.apache.logging.log4j.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:71)\n\tcom.cn.zc.benevolent.web.CorsFilter.doFilter(CorsFilter.java:40)\n\torg.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)\n\torg.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\n</pre>
<p><b>Root Cause</b></p>
<pre>java.lang.IllegalStateException: Optional int parameter &#39;userId&#39; is present but cannot be translated into a null value due to being declared as a primitive type. Consider declaring it as object wrapper for the corresponding primitive type.\n\torg.springframework.web.method.annotation.AbstractNamedValueMethodArgumentResolver.handleNullValue(AbstractNamedValueMethodArgumentResolver.java:238)\n\torg.springframework.web.method.annotation.AbstractNamedValueMethodArgumentResolver.resolveArgument(AbstractNamedValueMethodArgumentResolver.java:111)\n\torg.springframework.web.method.support.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:121)\n\torg.springframework.web.method.support.InvocableHandlerMethod.getMethodArgumentValues(InvocableHandlerMethod.java:158)\n\torg.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:128)\n\torg.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97)\n\torg.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)\n\torg.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)\n\torg.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)\n\torg.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)\n\torg.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)\n\torg.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)\n\torg.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)\n\tjavax.servlet.http.HttpServlet.service(HttpServlet.java:652)\n\torg.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)\n\tjavax.servlet.http.HttpServlet.service(HttpServlet.java:733)\n\torg.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)\n\torg.apache.logging.log4j.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:71)\n\tcom.cn.zc.benevolent.web.CorsFilter.doFilter(CorsFilter.java:40)\n\torg.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)\n\torg.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\n</pre>
<p><b>Note</b> The full stack trace of the root cause is available in the server logs.</p>
<hr class="line"/>
<h3>Apache Tomcat/8.5.57</h3></body>
</html>